﻿using System;
using System.Collections.Generic;
using IDAL;
using Model;

namespace BLL
{
    /// <summary>
    /// 系统日志Service层
    /// </summary>
    public class SystemLogService
    {
        private static readonly ISystemLogDAL dal = DALFactory.DataAccess.createSystemLogDAL();

        //保存日志
        public void saveSystemLog(User user, string events)
        {
            SystemLog systemLog = new SystemLog()
            {
                user = user,
                operateTime = DateTime.Now,
                events = events
            };
            dal.saveSystemLog(systemLog);
        }

        //得到日志列表
        public IList<SystemLog> getSystemLog()
        {
            return dal.getSystemLog();
        }

    }
}
